"""
    create by IAmFiveHigh on 2023/8/20
"""
from LA.Matrix import Matrix
from LA.Vector import Vector

if __name__ == '__main__':
    m1 = Matrix([[1, 0, 0], [0, 0, 0], [0, 0, 0]])
    print(m1)

    print(f"Matrix m1 第一行是 {m1.row_vector(1)}")
    print(f"Matrix m1 第一列是 {m1.col_vector(1)}")

    m2 = Matrix([[0, 2, 0], [0, 0, 0], [1, 1, 1]])
    print(f"{m1} + {m2} = {m1 + m2}")
    print(f"{m1} - {m2} = {m1 - m2}")
    print(f"{m1} * 2 = {m1 * 2}")
    print(f"2 * {m1} = {2 * m1}")
    print(f"-{m1} = {-m1}")

    zr = 4
    zc = 4
    m0 = Matrix.zero(zr, zc)
    print(f"zero_matrix_{zr}x{zc} = {m0}")

    v1 = Vector([1, 0, 1])
    print(f"{m1}·{v1} = {m1.dot(v1)}")

    print(f"{m1}·{m2} = {m1.dot(m2)}")
    print(f"{m2}.T = {m2.T()}")

    print(f"4阶单位矩阵: {Matrix.E(4)}")



